package router

import (
	"web02/middleware"

	"github.com/gin-gonic/gin"
)

var (
	//Router is
	Router = InitRouter()
)

//InitRouter router
func InitRouter() *gin.Engine {
	r := gin.Default()

	r.Use(middleware.SSOMiddleware)

	r.GET("test", func(c *gin.Context) {
		c.JSON(200, "hello "+c.GetString("user"))
	})

	return r
}
